package com.hoozhi.education.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;

import com.hoozhi.education.dao.EduGroupDao;
import com.hoozhi.education.entity.EduGroup;
import com.hoozhi.education.service.EduGroupService;

public class EduGroupServiceImpl implements EduGroupService {

	@Autowired
	private EduGroupDao eduGroupDao;
	
	@Override
	public List<EduGroup> getAllGroup() {
		return eduGroupDao.fingAll();
	}

	@Override
	public EduGroup getGroupById(Integer gid) {
		return eduGroupDao.findById(gid);
	}

	@Override
	public boolean saveGroup(EduGroup group) {
		eduGroupDao.save(group);
		
		return true;
	}

	@Override
	public boolean updateGroup(EduGroup group) {
		eduGroupDao.update(group);
		return false;
	}

	@Override
	public boolean deleteGroupById(Integer gid) {
		eduGroupDao.deleteById(gid);
		return false;
	}

	@Override
	public boolean deleteGroup(EduGroup group) {
		return false;
	}
}
